<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <script>
    setTimeout(() => {
      console.log('one');
    }, 0);

    Promise.resolve().then(() => console.log('two'));

    console.log('three');

    // three
    // two
    // one

    // 立即resolve的Promise的对象，是在本轮事件循环结束时执行
    // setTimeout在下一轮事件循环开始时执行
  </script>

</head>
<body>
  
</body>
</html>